const webpack = require('webpack');
module.exports = {
  // entry: 'app',
  entry: {
    'app': './src/app.ts'
  },
  
  output: {
    filename: '[name].bundle.js'
  },

  module: {
    rules: [
      {
        test: /\.tsx?$/,
        use: {
          loader: 'ts-loader'
        }
      },
      {
        test: /\.js$/,
        // use: 'babel-loader',
        use: {
          loader: 'babel-loader',
          options: {
            presets: [
              ['@babel/preset-env',{
                targets: {
                  browsers: ["> 1%", "last 2 versions"]
                }
              }]
            ]
          }
        },
        exclude: '/node_modules/'
      }
    ]
  }
}